<!DOCTYPE>
<html>
<head>
    <meta charset="utf-8">
    <title>隐患</title>
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="stylesheet" type="text/css" href="/common/css/public.css">
    <link rel="stylesheet" type="text/css" href="/common/css/style.css">
    <script type="text/javascript" src="/common/js/jquery.js"></script>
    <script>
		$(function ()
		{
			var i=0;
			var arr = [];
            //全选
            $("#checkAll").click(function(){
			   var checkLength = $("input[name='pick_fname']:checked").length;				
               if(i==0){
				    checkLength += 1;
                    $(".up_pick_nav :checkbox").prop("checked", true);
					$('.up_screen_total font').text(checkLength)
                    i=1;
                }else{
                    $(".up_pick_nav :checkbox").prop("checked", false);
					$('.up_screen_total font').text(0)
                    i=0;
                }              
            });	
			$("input[name='pick_fname']").click(function() {
				var checkLength = $("input[name='pick_fname']:checked").length;
				$('.up_screen_total font').text(checkLength)
			});
			
			$(".up_screen_total").click(function(){
				var strIds=new Array();//声明一个存放id的数组				
				$("input[name='pick_fname']").each(function (i,d){ 
					if (d.checked) { 
						strIds.push(d.value); 
					} 
				});
				if(strIds.length<1) 
					alert("您没有选中项!"); 
				else{ 
					//var ids = new Object();
					//var ids=strIds.join(",");								
					localStorage.setItem("key",strIds);										
					//alert("你选中的字符串有："+ids); 
					location.href="selected.html";
					
				} 	
			});
		});
    </script>
</head>
<body>
    <div class="up_list_content">
        <!--搜索start-->
        <div class="up_search">
        	<input type="text" />
            <span class="up_sear_button"></span>
        </div>
        <!--搜索end-->
        <!--选择复查人start-->
        <div class="up_pick_list">
        	<div class="up_pick_all">
            	<input type="checkbox"  name="all_fname" />
				<label  class="checkbox-label"></label>
                <span class="up_pick_fname">全选</span>
                <div class="clear_both"></div>
            </div>
            <ul class="up_pick_nav">
                <li>
                	<input type="checkbox"  name="pick_fname" value="俊雄1" />
					<label  class="checkbox-label"></label>
                    <span class="up_pick_photo">俊雄</span>
                    <span class="up_pick_second_fname">姜俊雄</span>
                    <div class="clear_both"></div>
                </li>
                <li>
                	<input type="checkbox"  name="pick_fname" value="俊雄2" />
					<label  class="checkbox-label"></label>
                    <span class="up_pick_photo">俊雄</span>
                    <span class="up_pick_second_fname">姜俊雄</span>
                    <div class="clear_both"></div>
                </li>
                <li>
                	<input type="checkbox"  name="pick_fname" value="俊雄3" />
					<label  class="checkbox-label"></label>
                    <span class="up_pick_photo">俊雄</span>
                    <span class="up_pick_second_fname">姜俊雄</span>
                    <div class="clear_both"></div>
                </li>
                <li>
                	<input type="checkbox"  name="pick_fname" value="俊雄4" />
					<label  class="checkbox-label"></label>
                    <span class="up_pick_photo">俊雄</span>
                    <span class="up_pick_second_fname">姜俊雄</span>
                    <div class="clear_both"></div>
                </li>
            </ul>
        </div>
        <!--选择复查人end-->
        <!--已选择总人数start-->
        <div class="up_screen_total"><span class="up_select_icon"></span><span class="up_select_jt">已选择<font>0</font>人</span></div>
        <!--已选择总人数end-->
    </div>
    <!--提交按钮start-->
    <div class="up_screen_button">
        <input type="button" value="确定">
    </div>
    <!--提交按钮end-->
</body>
</html>
